package com.koron.order.linepatrol.base.bean.vo;

import cn.hutool.core.collection.CollUtil;
import com.koron.order.linepatrol.base.bean.po.PatrolPointPo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @ClassName PatrolPointVo
 * @description
 * @Author zhouj
 * @Date 2021/10/27 9:28
 */
@Data
@ApiModel("巡视工单-巡视点Vo")
public class PatrolPointVo extends PatrolPointPo {

    @ApiModelProperty(value = "环境检查项列表")
    private List<PatrolEnvCheckVo> envCheckVos;

    @ApiModelProperty(value = "设备列表")
    private List<PatrolEquipmentVo> equipmentVos;

    public Integer getResult() {
        if (CollUtil.isEmpty(equipmentVos)) {
            return null;
        }
        return equipmentVos.get(0).getResult();
    }

}
